<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
    margin: 0;
    padding: 0;
}
.btumm {
    text-align: center;
    padding-top: 50%;
}
.btumm  {
color:#1d5983;
    size: 2;
}
#banner {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 200px;
    position: absolute;
    overflow: hidden;
}
#banner ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    width: 1000px;
}
#banner ul li {
    float: left;
    margin: 0;
    padding: 0;
}
#banner ul li .Image {
    width: 200px;
    height: 150px;
}
    </style>
</head>
<body>
    <div id="banner" >
        <ul>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
          <li > <a href="YunNan.html"><img src="./2/1.png"> 1</a></li>
        </ul>
      </div>
    <script>
        window.onload = function () {
            var oDiv = document.getElementById('banner');
            console.log(oDiv);
            var oUl = oDiv.getElementsByTagName('ul')[0];
            console.log("sdfas",oUl);
            var Li = oUl.getElementsByTagName('li');
            console.log(Li);
            oUl.innerHTML = oUl.innerHTML + oUl.innerHTML;
            oUl.style.width = Li[0].offsetWidth * Li.length + 'px';
            var speed = 2
            function move() {
                if (oUl.offsetLeft < -oUl.offsetWidth / speed) {
                    oUl.style.left = '0'
                }
                if (oUl.offsetLeft > 0) {
                    oUl.style.left = -oUl.offsetWidth / speed + 'px';
                }
                oUl.style.left = oUl.offsetLeft + speed + 'px';
            }
            var timer = setInterval(move, 30)
            oDiv.onmouseover = function () {
                clearInterval(timer);
            }
            oDiv.onmouseout = function () {
                timer = setInterval(move, 30)
            }
        }
    </script>
</body>
</html>